package com.tydic.springboot.util.easyExcel;

import com.tydic.springboot.service.DictService;

import java.util.List;
import java.util.Map;

public class DictSelector implements ExcelDynamicSelect {

    @Override
    public String[] getSource() {
        DictService dictService = SpringContextUtils.getBean(DictService.class);
        List<Map<String, String>> list = dictService.queryXzqh("0");
        String[] values = new String[list.size()];
        for (int i = 0; i < list.size(); i++) {
            values[i] = list.get(i).get("XZQHMC");
        }
        System.out.println("======================================================" + values.toString());
        return values;
    }
}
